package com.sf.fy.uav.common.request.order;

import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import java.math.BigDecimal;
import java.util.List;


/**
 * @author LTQ
 */

@Data
@Validated
public class CheckOrderRequest {


    @NotNull(message = "配送费不能为空")
    @ApiModelProperty("配送费")
    private String expressFee;

    @NotNull(message = "商品总金额不能为空")
    @ApiModelProperty("商品总金额")
    private BigDecimal price;

    @NotNull(message = "购买商品总数量不能为空")
    @ApiModelProperty("购买商品总数量")
    private Integer num;

    @NotBlank(message = "投放点id不能为空")
    @ApiModelProperty("投放点id，用于校验快递费是否发生变动")
    private String placementPointId;

    @ApiModelProperty("购物车")
    @NotEmpty(message = "购物车不能为空")
    List<CommodityRequest> commodityRequests;
}
